Left Termination of the query pattern goal_in_3(g, a, a) w.r.t. the given Prolog program could not be shown:



Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

Clauses:

goal(A, B, C) :- ','(s2l(A, D), applast(D, B, C)).
applast(L, X, Last) :- ','(append(L, .(X, []), LX), last(Last, LX)).
last(X, .(X, [])).
last(X, .(H, T)) :- last(X, T).
append([], L, L).
append(.(H, L1), L2, .(H, L3)) :- append(L1, L2, L3).
s2l(s(X), .(Y, Xs)) :- s2l(X, Xs).
s2l(0, []).

Queries:

goal(g,a,a).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
goal_in: (b,f,f)
s2l_in: (b,f)
applast_in: (f,f,f)
append_in: (f,f,f)
last_in: (f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(s(X), .(Y, Xs)) → U7_ga(X, Y, Xs, s2l_in_ga(X, Xs))
s2l_in_ga(0, []) → s2l_out_ga(0, [])
U7_ga(X, Y, Xs, s2l_out_ga(X, Xs)) → s2l_out_ga(s(X), .(Y, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_aaa(D, B, C))
applast_in_aaa(L, X, Last) → U3_aaa(L, X, Last, append_in_aaa(L, .(X, []), LX))
append_in_aaa([], L, L) → append_out_aaa([], L, L)
append_in_aaa(.(H, L1), L2, .(H, L3)) → U6_aaa(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
U6_aaa(H, L1, L2, L3, append_out_aaa(L1, L2, L3)) → append_out_aaa(.(H, L1), L2, .(H, L3))
U3_aaa(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_aaa(L, X, Last, last_in_aa(Last, LX))
last_in_aa(X, .(X, [])) → last_out_aa(X, .(X, []))
last_in_aa(X, .(H, T)) → U5_aa(X, H, T, last_in_aa(X, T))
U5_aa(X, H, T, last_out_aa(X, T)) → last_out_aa(X, .(H, T))
U4_aaa(L, X, Last, last_out_aa(Last, LX)) → applast_out_aaa(L, X, Last)
U2_gaa(A, B, C, applast_out_aaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
s(x1)  =  s(x1)
U7_ga(x1, x2, x3, x4)  =  U7_ga(x4)
0  =  0
s2l_out_ga(x1, x2)  =  s2l_out_ga
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x4)
applast_in_aaa(x1, x2, x3)  =  applast_in_aaa
U3_aaa(x1, x2, x3, x4)  =  U3_aaa(x4)
append_in_aaa(x1, x2, x3)  =  append_in_aaa
append_out_aaa(x1, x2, x3)  =  append_out_aaa
U6_aaa(x1, x2, x3, x4, x5)  =  U6_aaa(x5)
U4_aaa(x1, x2, x3, x4)  =  U4_aaa(x4)
last_in_aa(x1, x2)  =  last_in_aa
last_out_aa(x1, x2)  =  last_out_aa
U5_aa(x1, x2, x3, x4)  =  U5_aa(x4)
applast_out_aaa(x1, x2, x3)  =  applast_out_aaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(s(X), .(Y, Xs)) → U7_ga(X, Y, Xs, s2l_in_ga(X, Xs))
s2l_in_ga(0, []) → s2l_out_ga(0, [])
U7_ga(X, Y, Xs, s2l_out_ga(X, Xs)) → s2l_out_ga(s(X), .(Y, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_aaa(D, B, C))
applast_in_aaa(L, X, Last) → U3_aaa(L, X, Last, append_in_aaa(L, .(X, []), LX))
append_in_aaa([], L, L) → append_out_aaa([], L, L)
append_in_aaa(.(H, L1), L2, .(H, L3)) → U6_aaa(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
U6_aaa(H, L1, L2, L3, append_out_aaa(L1, L2, L3)) → append_out_aaa(.(H, L1), L2, .(H, L3))
U3_aaa(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_aaa(L, X, Last, last_in_aa(Last, LX))
last_in_aa(X, .(X, [])) → last_out_aa(X, .(X, []))
last_in_aa(X, .(H, T)) → U5_aa(X, H, T, last_in_aa(X, T))
U5_aa(X, H, T, last_out_aa(X, T)) → last_out_aa(X, .(H, T))
U4_aaa(L, X, Last, last_out_aa(Last, LX)) → applast_out_aaa(L, X, Last)
U2_gaa(A, B, C, applast_out_aaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
s(x1)  =  s(x1)
U7_ga(x1, x2, x3, x4)  =  U7_ga(x4)
0  =  0
s2l_out_ga(x1, x2)  =  s2l_out_ga
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x4)
applast_in_aaa(x1, x2, x3)  =  applast_in_aaa
U3_aaa(x1, x2, x3, x4)  =  U3_aaa(x4)
append_in_aaa(x1, x2, x3)  =  append_in_aaa
append_out_aaa(x1, x2, x3)  =  append_out_aaa
U6_aaa(x1, x2, x3, x4, x5)  =  U6_aaa(x5)
U4_aaa(x1, x2, x3, x4)  =  U4_aaa(x4)
last_in_aa(x1, x2)  =  last_in_aa
last_out_aa(x1, x2)  =  last_out_aa
U5_aa(x1, x2, x3, x4)  =  U5_aa(x4)
applast_out_aaa(x1, x2, x3)  =  applast_out_aaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

GOAL_IN_GAA(A, B, C) → U1_GAA(A, B, C, s2l_in_ga(A, D))
GOAL_IN_GAA(A, B, C) → S2L_IN_GA(A, D)
S2L_IN_GA(s(X), .(Y, Xs)) → U7_GA(X, Y, Xs, s2l_in_ga(X, Xs))
S2L_IN_GA(s(X), .(Y, Xs)) → S2L_IN_GA(X, Xs)
U1_GAA(A, B, C, s2l_out_ga(A, D)) → U2_GAA(A, B, C, applast_in_aaa(D, B, C))
U1_GAA(A, B, C, s2l_out_ga(A, D)) → APPLAST_IN_AAA(D, B, C)
APPLAST_IN_AAA(L, X, Last) → U3_AAA(L, X, Last, append_in_aaa(L, .(X, []), LX))
APPLAST_IN_AAA(L, X, Last) → APPEND_IN_AAA(L, .(X, []), LX)
APPEND_IN_AAA(.(H, L1), L2, .(H, L3)) → U6_AAA(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
APPEND_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND_IN_AAA(L1, L2, L3)
U3_AAA(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_AAA(L, X, Last, last_in_aa(Last, LX))
U3_AAA(L, X, Last, append_out_aaa(L, .(X, []), LX)) → LAST_IN_AA(Last, LX)
LAST_IN_AA(X, .(H, T)) → U5_AA(X, H, T, last_in_aa(X, T))
LAST_IN_AA(X, .(H, T)) → LAST_IN_AA(X, T)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(s(X), .(Y, Xs)) → U7_ga(X, Y, Xs, s2l_in_ga(X, Xs))
s2l_in_ga(0, []) → s2l_out_ga(0, [])
U7_ga(X, Y, Xs, s2l_out_ga(X, Xs)) → s2l_out_ga(s(X), .(Y, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_aaa(D, B, C))
applast_in_aaa(L, X, Last) → U3_aaa(L, X, Last, append_in_aaa(L, .(X, []), LX))
append_in_aaa([], L, L) → append_out_aaa([], L, L)
append_in_aaa(.(H, L1), L2, .(H, L3)) → U6_aaa(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
U6_aaa(H, L1, L2, L3, append_out_aaa(L1, L2, L3)) → append_out_aaa(.(H, L1), L2, .(H, L3))
U3_aaa(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_aaa(L, X, Last, last_in_aa(Last, LX))
last_in_aa(X, .(X, [])) → last_out_aa(X, .(X, []))
last_in_aa(X, .(H, T)) → U5_aa(X, H, T, last_in_aa(X, T))
U5_aa(X, H, T, last_out_aa(X, T)) → last_out_aa(X, .(H, T))
U4_aaa(L, X, Last, last_out_aa(Last, LX)) → applast_out_aaa(L, X, Last)
U2_gaa(A, B, C, applast_out_aaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
s(x1)  =  s(x1)
U7_ga(x1, x2, x3, x4)  =  U7_ga(x4)
0  =  0
s2l_out_ga(x1, x2)  =  s2l_out_ga
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x4)
applast_in_aaa(x1, x2, x3)  =  applast_in_aaa
U3_aaa(x1, x2, x3, x4)  =  U3_aaa(x4)
append_in_aaa(x1, x2, x3)  =  append_in_aaa
append_out_aaa(x1, x2, x3)  =  append_out_aaa
U6_aaa(x1, x2, x3, x4, x5)  =  U6_aaa(x5)
U4_aaa(x1, x2, x3, x4)  =  U4_aaa(x4)
last_in_aa(x1, x2)  =  last_in_aa
last_out_aa(x1, x2)  =  last_out_aa
U5_aa(x1, x2, x3, x4)  =  U5_aa(x4)
applast_out_aaa(x1, x2, x3)  =  applast_out_aaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa
U4_AAA(x1, x2, x3, x4)  =  U4_AAA(x4)
U5_AA(x1, x2, x3, x4)  =  U5_AA(x4)
LAST_IN_AA(x1, x2)  =  LAST_IN_AA
U6_AAA(x1, x2, x3, x4, x5)  =  U6_AAA(x5)
APPLAST_IN_AAA(x1, x2, x3)  =  APPLAST_IN_AAA
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)
U3_AAA(x1, x2, x3, x4)  =  U3_AAA(x4)
APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA
U2_GAA(x1, x2, x3, x4)  =  U2_GAA(x4)
U1_GAA(x1, x2, x3, x4)  =  U1_GAA(x4)
GOAL_IN_GAA(x1, x2, x3)  =  GOAL_IN_GAA(x1)
U7_GA(x1, x2, x3, x4)  =  U7_GA(x4)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

GOAL_IN_GAA(A, B, C) → U1_GAA(A, B, C, s2l_in_ga(A, D))
GOAL_IN_GAA(A, B, C) → S2L_IN_GA(A, D)
S2L_IN_GA(s(X), .(Y, Xs)) → U7_GA(X, Y, Xs, s2l_in_ga(X, Xs))
S2L_IN_GA(s(X), .(Y, Xs)) → S2L_IN_GA(X, Xs)
U1_GAA(A, B, C, s2l_out_ga(A, D)) → U2_GAA(A, B, C, applast_in_aaa(D, B, C))
U1_GAA(A, B, C, s2l_out_ga(A, D)) → APPLAST_IN_AAA(D, B, C)
APPLAST_IN_AAA(L, X, Last) → U3_AAA(L, X, Last, append_in_aaa(L, .(X, []), LX))
APPLAST_IN_AAA(L, X, Last) → APPEND_IN_AAA(L, .(X, []), LX)
APPEND_IN_AAA(.(H, L1), L2, .(H, L3)) → U6_AAA(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
APPEND_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND_IN_AAA(L1, L2, L3)
U3_AAA(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_AAA(L, X, Last, last_in_aa(Last, LX))
U3_AAA(L, X, Last, append_out_aaa(L, .(X, []), LX)) → LAST_IN_AA(Last, LX)
LAST_IN_AA(X, .(H, T)) → U5_AA(X, H, T, last_in_aa(X, T))
LAST_IN_AA(X, .(H, T)) → LAST_IN_AA(X, T)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(s(X), .(Y, Xs)) → U7_ga(X, Y, Xs, s2l_in_ga(X, Xs))
s2l_in_ga(0, []) → s2l_out_ga(0, [])
U7_ga(X, Y, Xs, s2l_out_ga(X, Xs)) → s2l_out_ga(s(X), .(Y, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_aaa(D, B, C))
applast_in_aaa(L, X, Last) → U3_aaa(L, X, Last, append_in_aaa(L, .(X, []), LX))
append_in_aaa([], L, L) → append_out_aaa([], L, L)
append_in_aaa(.(H, L1), L2, .(H, L3)) → U6_aaa(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
U6_aaa(H, L1, L2, L3, append_out_aaa(L1, L2, L3)) → append_out_aaa(.(H, L1), L2, .(H, L3))
U3_aaa(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_aaa(L, X, Last, last_in_aa(Last, LX))
last_in_aa(X, .(X, [])) → last_out_aa(X, .(X, []))
last_in_aa(X, .(H, T)) → U5_aa(X, H, T, last_in_aa(X, T))
U5_aa(X, H, T, last_out_aa(X, T)) → last_out_aa(X, .(H, T))
U4_aaa(L, X, Last, last_out_aa(Last, LX)) → applast_out_aaa(L, X, Last)
U2_gaa(A, B, C, applast_out_aaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
s(x1)  =  s(x1)
U7_ga(x1, x2, x3, x4)  =  U7_ga(x4)
0  =  0
s2l_out_ga(x1, x2)  =  s2l_out_ga
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x4)
applast_in_aaa(x1, x2, x3)  =  applast_in_aaa
U3_aaa(x1, x2, x3, x4)  =  U3_aaa(x4)
append_in_aaa(x1, x2, x3)  =  append_in_aaa
append_out_aaa(x1, x2, x3)  =  append_out_aaa
U6_aaa(x1, x2, x3, x4, x5)  =  U6_aaa(x5)
U4_aaa(x1, x2, x3, x4)  =  U4_aaa(x4)
last_in_aa(x1, x2)  =  last_in_aa
last_out_aa(x1, x2)  =  last_out_aa
U5_aa(x1, x2, x3, x4)  =  U5_aa(x4)
applast_out_aaa(x1, x2, x3)  =  applast_out_aaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa
U4_AAA(x1, x2, x3, x4)  =  U4_AAA(x4)
U5_AA(x1, x2, x3, x4)  =  U5_AA(x4)
LAST_IN_AA(x1, x2)  =  LAST_IN_AA
U6_AAA(x1, x2, x3, x4, x5)  =  U6_AAA(x5)
APPLAST_IN_AAA(x1, x2, x3)  =  APPLAST_IN_AAA
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)
U3_AAA(x1, x2, x3, x4)  =  U3_AAA(x4)
APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA
U2_GAA(x1, x2, x3, x4)  =  U2_GAA(x4)
U1_GAA(x1, x2, x3, x4)  =  U1_GAA(x4)
GOAL_IN_GAA(x1, x2, x3)  =  GOAL_IN_GAA(x1)
U7_GA(x1, x2, x3, x4)  =  U7_GA(x4)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 11 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

LAST_IN_AA(X, .(H, T)) → LAST_IN_AA(X, T)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(s(X), .(Y, Xs)) → U7_ga(X, Y, Xs, s2l_in_ga(X, Xs))
s2l_in_ga(0, []) → s2l_out_ga(0, [])
U7_ga(X, Y, Xs, s2l_out_ga(X, Xs)) → s2l_out_ga(s(X), .(Y, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_aaa(D, B, C))
applast_in_aaa(L, X, Last) → U3_aaa(L, X, Last, append_in_aaa(L, .(X, []), LX))
append_in_aaa([], L, L) → append_out_aaa([], L, L)
append_in_aaa(.(H, L1), L2, .(H, L3)) → U6_aaa(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
U6_aaa(H, L1, L2, L3, append_out_aaa(L1, L2, L3)) → append_out_aaa(.(H, L1), L2, .(H, L3))
U3_aaa(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_aaa(L, X, Last, last_in_aa(Last, LX))
last_in_aa(X, .(X, [])) → last_out_aa(X, .(X, []))
last_in_aa(X, .(H, T)) → U5_aa(X, H, T, last_in_aa(X, T))
U5_aa(X, H, T, last_out_aa(X, T)) → last_out_aa(X, .(H, T))
U4_aaa(L, X, Last, last_out_aa(Last, LX)) → applast_out_aaa(L, X, Last)
U2_gaa(A, B, C, applast_out_aaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
s(x1)  =  s(x1)
U7_ga(x1, x2, x3, x4)  =  U7_ga(x4)
0  =  0
s2l_out_ga(x1, x2)  =  s2l_out_ga
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x4)
applast_in_aaa(x1, x2, x3)  =  applast_in_aaa
U3_aaa(x1, x2, x3, x4)  =  U3_aaa(x4)
append_in_aaa(x1, x2, x3)  =  append_in_aaa
append_out_aaa(x1, x2, x3)  =  append_out_aaa
U6_aaa(x1, x2, x3, x4, x5)  =  U6_aaa(x5)
U4_aaa(x1, x2, x3, x4)  =  U4_aaa(x4)
last_in_aa(x1, x2)  =  last_in_aa
last_out_aa(x1, x2)  =  last_out_aa
U5_aa(x1, x2, x3, x4)  =  U5_aa(x4)
applast_out_aaa(x1, x2, x3)  =  applast_out_aaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa
LAST_IN_AA(x1, x2)  =  LAST_IN_AA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

LAST_IN_AA(X, .(H, T)) → LAST_IN_AA(X, T)

R is empty.
The argument filtering Pi contains the following mapping:
LAST_IN_AA(x1, x2)  =  LAST_IN_AA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

LAST_IN_AALAST_IN_AA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

LAST_IN_AALAST_IN_AA

The TRS R consists of the following rules:none


s = LAST_IN_AA evaluates to t =LAST_IN_AA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from LAST_IN_AA to LAST_IN_AA.





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APPEND_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND_IN_AAA(L1, L2, L3)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(s(X), .(Y, Xs)) → U7_ga(X, Y, Xs, s2l_in_ga(X, Xs))
s2l_in_ga(0, []) → s2l_out_ga(0, [])
U7_ga(X, Y, Xs, s2l_out_ga(X, Xs)) → s2l_out_ga(s(X), .(Y, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_aaa(D, B, C))
applast_in_aaa(L, X, Last) → U3_aaa(L, X, Last, append_in_aaa(L, .(X, []), LX))
append_in_aaa([], L, L) → append_out_aaa([], L, L)
append_in_aaa(.(H, L1), L2, .(H, L3)) → U6_aaa(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
U6_aaa(H, L1, L2, L3, append_out_aaa(L1, L2, L3)) → append_out_aaa(.(H, L1), L2, .(H, L3))
U3_aaa(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_aaa(L, X, Last, last_in_aa(Last, LX))
last_in_aa(X, .(X, [])) → last_out_aa(X, .(X, []))
last_in_aa(X, .(H, T)) → U5_aa(X, H, T, last_in_aa(X, T))
U5_aa(X, H, T, last_out_aa(X, T)) → last_out_aa(X, .(H, T))
U4_aaa(L, X, Last, last_out_aa(Last, LX)) → applast_out_aaa(L, X, Last)
U2_gaa(A, B, C, applast_out_aaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
s(x1)  =  s(x1)
U7_ga(x1, x2, x3, x4)  =  U7_ga(x4)
0  =  0
s2l_out_ga(x1, x2)  =  s2l_out_ga
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x4)
applast_in_aaa(x1, x2, x3)  =  applast_in_aaa
U3_aaa(x1, x2, x3, x4)  =  U3_aaa(x4)
append_in_aaa(x1, x2, x3)  =  append_in_aaa
append_out_aaa(x1, x2, x3)  =  append_out_aaa
U6_aaa(x1, x2, x3, x4, x5)  =  U6_aaa(x5)
U4_aaa(x1, x2, x3, x4)  =  U4_aaa(x4)
last_in_aa(x1, x2)  =  last_in_aa
last_out_aa(x1, x2)  =  last_out_aa
U5_aa(x1, x2, x3, x4)  =  U5_aa(x4)
applast_out_aaa(x1, x2, x3)  =  applast_out_aaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa
APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APPEND_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND_IN_AAA(L1, L2, L3)

R is empty.
The argument filtering Pi contains the following mapping:
APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

APPEND_IN_AAAAPPEND_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

APPEND_IN_AAAAPPEND_IN_AAA

The TRS R consists of the following rules:none


s = APPEND_IN_AAA evaluates to t =APPEND_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APPEND_IN_AAA to APPEND_IN_AAA.





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

S2L_IN_GA(s(X), .(Y, Xs)) → S2L_IN_GA(X, Xs)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(s(X), .(Y, Xs)) → U7_ga(X, Y, Xs, s2l_in_ga(X, Xs))
s2l_in_ga(0, []) → s2l_out_ga(0, [])
U7_ga(X, Y, Xs, s2l_out_ga(X, Xs)) → s2l_out_ga(s(X), .(Y, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_aaa(D, B, C))
applast_in_aaa(L, X, Last) → U3_aaa(L, X, Last, append_in_aaa(L, .(X, []), LX))
append_in_aaa([], L, L) → append_out_aaa([], L, L)
append_in_aaa(.(H, L1), L2, .(H, L3)) → U6_aaa(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
U6_aaa(H, L1, L2, L3, append_out_aaa(L1, L2, L3)) → append_out_aaa(.(H, L1), L2, .(H, L3))
U3_aaa(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_aaa(L, X, Last, last_in_aa(Last, LX))
last_in_aa(X, .(X, [])) → last_out_aa(X, .(X, []))
last_in_aa(X, .(H, T)) → U5_aa(X, H, T, last_in_aa(X, T))
U5_aa(X, H, T, last_out_aa(X, T)) → last_out_aa(X, .(H, T))
U4_aaa(L, X, Last, last_out_aa(Last, LX)) → applast_out_aaa(L, X, Last)
U2_gaa(A, B, C, applast_out_aaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
s(x1)  =  s(x1)
U7_ga(x1, x2, x3, x4)  =  U7_ga(x4)
0  =  0
s2l_out_ga(x1, x2)  =  s2l_out_ga
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x4)
applast_in_aaa(x1, x2, x3)  =  applast_in_aaa
U3_aaa(x1, x2, x3, x4)  =  U3_aaa(x4)
append_in_aaa(x1, x2, x3)  =  append_in_aaa
append_out_aaa(x1, x2, x3)  =  append_out_aaa
U6_aaa(x1, x2, x3, x4, x5)  =  U6_aaa(x5)
U4_aaa(x1, x2, x3, x4)  =  U4_aaa(x4)
last_in_aa(x1, x2)  =  last_in_aa
last_out_aa(x1, x2)  =  last_out_aa
U5_aa(x1, x2, x3, x4)  =  U5_aa(x4)
applast_out_aaa(x1, x2, x3)  =  applast_out_aaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

S2L_IN_GA(s(X), .(Y, Xs)) → S2L_IN_GA(X, Xs)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

S2L_IN_GA(s(X)) → S2L_IN_GA(X)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:


We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
goal_in: (b,f,f)
s2l_in: (b,f)
applast_in: (f,f,f)
append_in: (f,f,f)
last_in: (f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(s(X), .(Y, Xs)) → U7_ga(X, Y, Xs, s2l_in_ga(X, Xs))
s2l_in_ga(0, []) → s2l_out_ga(0, [])
U7_ga(X, Y, Xs, s2l_out_ga(X, Xs)) → s2l_out_ga(s(X), .(Y, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_aaa(D, B, C))
applast_in_aaa(L, X, Last) → U3_aaa(L, X, Last, append_in_aaa(L, .(X, []), LX))
append_in_aaa([], L, L) → append_out_aaa([], L, L)
append_in_aaa(.(H, L1), L2, .(H, L3)) → U6_aaa(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
U6_aaa(H, L1, L2, L3, append_out_aaa(L1, L2, L3)) → append_out_aaa(.(H, L1), L2, .(H, L3))
U3_aaa(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_aaa(L, X, Last, last_in_aa(Last, LX))
last_in_aa(X, .(X, [])) → last_out_aa(X, .(X, []))
last_in_aa(X, .(H, T)) → U5_aa(X, H, T, last_in_aa(X, T))
U5_aa(X, H, T, last_out_aa(X, T)) → last_out_aa(X, .(H, T))
U4_aaa(L, X, Last, last_out_aa(Last, LX)) → applast_out_aaa(L, X, Last)
U2_gaa(A, B, C, applast_out_aaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x1, x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
s(x1)  =  s(x1)
U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x4)
0  =  0
s2l_out_ga(x1, x2)  =  s2l_out_ga(x1)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x1, x4)
applast_in_aaa(x1, x2, x3)  =  applast_in_aaa
U3_aaa(x1, x2, x3, x4)  =  U3_aaa(x4)
append_in_aaa(x1, x2, x3)  =  append_in_aaa
append_out_aaa(x1, x2, x3)  =  append_out_aaa
U6_aaa(x1, x2, x3, x4, x5)  =  U6_aaa(x5)
U4_aaa(x1, x2, x3, x4)  =  U4_aaa(x4)
last_in_aa(x1, x2)  =  last_in_aa
last_out_aa(x1, x2)  =  last_out_aa
U5_aa(x1, x2, x3, x4)  =  U5_aa(x4)
applast_out_aaa(x1, x2, x3)  =  applast_out_aaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa(x1)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(s(X), .(Y, Xs)) → U7_ga(X, Y, Xs, s2l_in_ga(X, Xs))
s2l_in_ga(0, []) → s2l_out_ga(0, [])
U7_ga(X, Y, Xs, s2l_out_ga(X, Xs)) → s2l_out_ga(s(X), .(Y, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_aaa(D, B, C))
applast_in_aaa(L, X, Last) → U3_aaa(L, X, Last, append_in_aaa(L, .(X, []), LX))
append_in_aaa([], L, L) → append_out_aaa([], L, L)
append_in_aaa(.(H, L1), L2, .(H, L3)) → U6_aaa(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
U6_aaa(H, L1, L2, L3, append_out_aaa(L1, L2, L3)) → append_out_aaa(.(H, L1), L2, .(H, L3))
U3_aaa(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_aaa(L, X, Last, last_in_aa(Last, LX))
last_in_aa(X, .(X, [])) → last_out_aa(X, .(X, []))
last_in_aa(X, .(H, T)) → U5_aa(X, H, T, last_in_aa(X, T))
U5_aa(X, H, T, last_out_aa(X, T)) → last_out_aa(X, .(H, T))
U4_aaa(L, X, Last, last_out_aa(Last, LX)) → applast_out_aaa(L, X, Last)
U2_gaa(A, B, C, applast_out_aaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x1, x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
s(x1)  =  s(x1)
U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x4)
0  =  0
s2l_out_ga(x1, x2)  =  s2l_out_ga(x1)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x1, x4)
applast_in_aaa(x1, x2, x3)  =  applast_in_aaa
U3_aaa(x1, x2, x3, x4)  =  U3_aaa(x4)
append_in_aaa(x1, x2, x3)  =  append_in_aaa
append_out_aaa(x1, x2, x3)  =  append_out_aaa
U6_aaa(x1, x2, x3, x4, x5)  =  U6_aaa(x5)
U4_aaa(x1, x2, x3, x4)  =  U4_aaa(x4)
last_in_aa(x1, x2)  =  last_in_aa
last_out_aa(x1, x2)  =  last_out_aa
U5_aa(x1, x2, x3, x4)  =  U5_aa(x4)
applast_out_aaa(x1, x2, x3)  =  applast_out_aaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa(x1)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

GOAL_IN_GAA(A, B, C) → U1_GAA(A, B, C, s2l_in_ga(A, D))
GOAL_IN_GAA(A, B, C) → S2L_IN_GA(A, D)
S2L_IN_GA(s(X), .(Y, Xs)) → U7_GA(X, Y, Xs, s2l_in_ga(X, Xs))
S2L_IN_GA(s(X), .(Y, Xs)) → S2L_IN_GA(X, Xs)
U1_GAA(A, B, C, s2l_out_ga(A, D)) → U2_GAA(A, B, C, applast_in_aaa(D, B, C))
U1_GAA(A, B, C, s2l_out_ga(A, D)) → APPLAST_IN_AAA(D, B, C)
APPLAST_IN_AAA(L, X, Last) → U3_AAA(L, X, Last, append_in_aaa(L, .(X, []), LX))
APPLAST_IN_AAA(L, X, Last) → APPEND_IN_AAA(L, .(X, []), LX)
APPEND_IN_AAA(.(H, L1), L2, .(H, L3)) → U6_AAA(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
APPEND_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND_IN_AAA(L1, L2, L3)
U3_AAA(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_AAA(L, X, Last, last_in_aa(Last, LX))
U3_AAA(L, X, Last, append_out_aaa(L, .(X, []), LX)) → LAST_IN_AA(Last, LX)
LAST_IN_AA(X, .(H, T)) → U5_AA(X, H, T, last_in_aa(X, T))
LAST_IN_AA(X, .(H, T)) → LAST_IN_AA(X, T)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(s(X), .(Y, Xs)) → U7_ga(X, Y, Xs, s2l_in_ga(X, Xs))
s2l_in_ga(0, []) → s2l_out_ga(0, [])
U7_ga(X, Y, Xs, s2l_out_ga(X, Xs)) → s2l_out_ga(s(X), .(Y, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_aaa(D, B, C))
applast_in_aaa(L, X, Last) → U3_aaa(L, X, Last, append_in_aaa(L, .(X, []), LX))
append_in_aaa([], L, L) → append_out_aaa([], L, L)
append_in_aaa(.(H, L1), L2, .(H, L3)) → U6_aaa(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
U6_aaa(H, L1, L2, L3, append_out_aaa(L1, L2, L3)) → append_out_aaa(.(H, L1), L2, .(H, L3))
U3_aaa(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_aaa(L, X, Last, last_in_aa(Last, LX))
last_in_aa(X, .(X, [])) → last_out_aa(X, .(X, []))
last_in_aa(X, .(H, T)) → U5_aa(X, H, T, last_in_aa(X, T))
U5_aa(X, H, T, last_out_aa(X, T)) → last_out_aa(X, .(H, T))
U4_aaa(L, X, Last, last_out_aa(Last, LX)) → applast_out_aaa(L, X, Last)
U2_gaa(A, B, C, applast_out_aaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x1, x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
s(x1)  =  s(x1)
U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x4)
0  =  0
s2l_out_ga(x1, x2)  =  s2l_out_ga(x1)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x1, x4)
applast_in_aaa(x1, x2, x3)  =  applast_in_aaa
U3_aaa(x1, x2, x3, x4)  =  U3_aaa(x4)
append_in_aaa(x1, x2, x3)  =  append_in_aaa
append_out_aaa(x1, x2, x3)  =  append_out_aaa
U6_aaa(x1, x2, x3, x4, x5)  =  U6_aaa(x5)
U4_aaa(x1, x2, x3, x4)  =  U4_aaa(x4)
last_in_aa(x1, x2)  =  last_in_aa
last_out_aa(x1, x2)  =  last_out_aa
U5_aa(x1, x2, x3, x4)  =  U5_aa(x4)
applast_out_aaa(x1, x2, x3)  =  applast_out_aaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa(x1)
U4_AAA(x1, x2, x3, x4)  =  U4_AAA(x4)
U5_AA(x1, x2, x3, x4)  =  U5_AA(x4)
LAST_IN_AA(x1, x2)  =  LAST_IN_AA
U6_AAA(x1, x2, x3, x4, x5)  =  U6_AAA(x5)
APPLAST_IN_AAA(x1, x2, x3)  =  APPLAST_IN_AAA
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)
U3_AAA(x1, x2, x3, x4)  =  U3_AAA(x4)
APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA
U2_GAA(x1, x2, x3, x4)  =  U2_GAA(x1, x4)
U1_GAA(x1, x2, x3, x4)  =  U1_GAA(x1, x4)
GOAL_IN_GAA(x1, x2, x3)  =  GOAL_IN_GAA(x1)
U7_GA(x1, x2, x3, x4)  =  U7_GA(x1, x4)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

GOAL_IN_GAA(A, B, C) → U1_GAA(A, B, C, s2l_in_ga(A, D))
GOAL_IN_GAA(A, B, C) → S2L_IN_GA(A, D)
S2L_IN_GA(s(X), .(Y, Xs)) → U7_GA(X, Y, Xs, s2l_in_ga(X, Xs))
S2L_IN_GA(s(X), .(Y, Xs)) → S2L_IN_GA(X, Xs)
U1_GAA(A, B, C, s2l_out_ga(A, D)) → U2_GAA(A, B, C, applast_in_aaa(D, B, C))
U1_GAA(A, B, C, s2l_out_ga(A, D)) → APPLAST_IN_AAA(D, B, C)
APPLAST_IN_AAA(L, X, Last) → U3_AAA(L, X, Last, append_in_aaa(L, .(X, []), LX))
APPLAST_IN_AAA(L, X, Last) → APPEND_IN_AAA(L, .(X, []), LX)
APPEND_IN_AAA(.(H, L1), L2, .(H, L3)) → U6_AAA(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
APPEND_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND_IN_AAA(L1, L2, L3)
U3_AAA(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_AAA(L, X, Last, last_in_aa(Last, LX))
U3_AAA(L, X, Last, append_out_aaa(L, .(X, []), LX)) → LAST_IN_AA(Last, LX)
LAST_IN_AA(X, .(H, T)) → U5_AA(X, H, T, last_in_aa(X, T))
LAST_IN_AA(X, .(H, T)) → LAST_IN_AA(X, T)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(s(X), .(Y, Xs)) → U7_ga(X, Y, Xs, s2l_in_ga(X, Xs))
s2l_in_ga(0, []) → s2l_out_ga(0, [])
U7_ga(X, Y, Xs, s2l_out_ga(X, Xs)) → s2l_out_ga(s(X), .(Y, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_aaa(D, B, C))
applast_in_aaa(L, X, Last) → U3_aaa(L, X, Last, append_in_aaa(L, .(X, []), LX))
append_in_aaa([], L, L) → append_out_aaa([], L, L)
append_in_aaa(.(H, L1), L2, .(H, L3)) → U6_aaa(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
U6_aaa(H, L1, L2, L3, append_out_aaa(L1, L2, L3)) → append_out_aaa(.(H, L1), L2, .(H, L3))
U3_aaa(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_aaa(L, X, Last, last_in_aa(Last, LX))
last_in_aa(X, .(X, [])) → last_out_aa(X, .(X, []))
last_in_aa(X, .(H, T)) → U5_aa(X, H, T, last_in_aa(X, T))
U5_aa(X, H, T, last_out_aa(X, T)) → last_out_aa(X, .(H, T))
U4_aaa(L, X, Last, last_out_aa(Last, LX)) → applast_out_aaa(L, X, Last)
U2_gaa(A, B, C, applast_out_aaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x1, x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
s(x1)  =  s(x1)
U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x4)
0  =  0
s2l_out_ga(x1, x2)  =  s2l_out_ga(x1)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x1, x4)
applast_in_aaa(x1, x2, x3)  =  applast_in_aaa
U3_aaa(x1, x2, x3, x4)  =  U3_aaa(x4)
append_in_aaa(x1, x2, x3)  =  append_in_aaa
append_out_aaa(x1, x2, x3)  =  append_out_aaa
U6_aaa(x1, x2, x3, x4, x5)  =  U6_aaa(x5)
U4_aaa(x1, x2, x3, x4)  =  U4_aaa(x4)
last_in_aa(x1, x2)  =  last_in_aa
last_out_aa(x1, x2)  =  last_out_aa
U5_aa(x1, x2, x3, x4)  =  U5_aa(x4)
applast_out_aaa(x1, x2, x3)  =  applast_out_aaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa(x1)
U4_AAA(x1, x2, x3, x4)  =  U4_AAA(x4)
U5_AA(x1, x2, x3, x4)  =  U5_AA(x4)
LAST_IN_AA(x1, x2)  =  LAST_IN_AA
U6_AAA(x1, x2, x3, x4, x5)  =  U6_AAA(x5)
APPLAST_IN_AAA(x1, x2, x3)  =  APPLAST_IN_AAA
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)
U3_AAA(x1, x2, x3, x4)  =  U3_AAA(x4)
APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA
U2_GAA(x1, x2, x3, x4)  =  U2_GAA(x1, x4)
U1_GAA(x1, x2, x3, x4)  =  U1_GAA(x1, x4)
GOAL_IN_GAA(x1, x2, x3)  =  GOAL_IN_GAA(x1)
U7_GA(x1, x2, x3, x4)  =  U7_GA(x1, x4)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 11 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LAST_IN_AA(X, .(H, T)) → LAST_IN_AA(X, T)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(s(X), .(Y, Xs)) → U7_ga(X, Y, Xs, s2l_in_ga(X, Xs))
s2l_in_ga(0, []) → s2l_out_ga(0, [])
U7_ga(X, Y, Xs, s2l_out_ga(X, Xs)) → s2l_out_ga(s(X), .(Y, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_aaa(D, B, C))
applast_in_aaa(L, X, Last) → U3_aaa(L, X, Last, append_in_aaa(L, .(X, []), LX))
append_in_aaa([], L, L) → append_out_aaa([], L, L)
append_in_aaa(.(H, L1), L2, .(H, L3)) → U6_aaa(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
U6_aaa(H, L1, L2, L3, append_out_aaa(L1, L2, L3)) → append_out_aaa(.(H, L1), L2, .(H, L3))
U3_aaa(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_aaa(L, X, Last, last_in_aa(Last, LX))
last_in_aa(X, .(X, [])) → last_out_aa(X, .(X, []))
last_in_aa(X, .(H, T)) → U5_aa(X, H, T, last_in_aa(X, T))
U5_aa(X, H, T, last_out_aa(X, T)) → last_out_aa(X, .(H, T))
U4_aaa(L, X, Last, last_out_aa(Last, LX)) → applast_out_aaa(L, X, Last)
U2_gaa(A, B, C, applast_out_aaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x1, x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
s(x1)  =  s(x1)
U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x4)
0  =  0
s2l_out_ga(x1, x2)  =  s2l_out_ga(x1)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x1, x4)
applast_in_aaa(x1, x2, x3)  =  applast_in_aaa
U3_aaa(x1, x2, x3, x4)  =  U3_aaa(x4)
append_in_aaa(x1, x2, x3)  =  append_in_aaa
append_out_aaa(x1, x2, x3)  =  append_out_aaa
U6_aaa(x1, x2, x3, x4, x5)  =  U6_aaa(x5)
U4_aaa(x1, x2, x3, x4)  =  U4_aaa(x4)
last_in_aa(x1, x2)  =  last_in_aa
last_out_aa(x1, x2)  =  last_out_aa
U5_aa(x1, x2, x3, x4)  =  U5_aa(x4)
applast_out_aaa(x1, x2, x3)  =  applast_out_aaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa(x1)
LAST_IN_AA(x1, x2)  =  LAST_IN_AA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LAST_IN_AA(X, .(H, T)) → LAST_IN_AA(X, T)

R is empty.
The argument filtering Pi contains the following mapping:
LAST_IN_AA(x1, x2)  =  LAST_IN_AA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

LAST_IN_AALAST_IN_AA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

LAST_IN_AALAST_IN_AA

The TRS R consists of the following rules:none


s = LAST_IN_AA evaluates to t =LAST_IN_AA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from LAST_IN_AA to LAST_IN_AA.





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND_IN_AAA(L1, L2, L3)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(s(X), .(Y, Xs)) → U7_ga(X, Y, Xs, s2l_in_ga(X, Xs))
s2l_in_ga(0, []) → s2l_out_ga(0, [])
U7_ga(X, Y, Xs, s2l_out_ga(X, Xs)) → s2l_out_ga(s(X), .(Y, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_aaa(D, B, C))
applast_in_aaa(L, X, Last) → U3_aaa(L, X, Last, append_in_aaa(L, .(X, []), LX))
append_in_aaa([], L, L) → append_out_aaa([], L, L)
append_in_aaa(.(H, L1), L2, .(H, L3)) → U6_aaa(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
U6_aaa(H, L1, L2, L3, append_out_aaa(L1, L2, L3)) → append_out_aaa(.(H, L1), L2, .(H, L3))
U3_aaa(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_aaa(L, X, Last, last_in_aa(Last, LX))
last_in_aa(X, .(X, [])) → last_out_aa(X, .(X, []))
last_in_aa(X, .(H, T)) → U5_aa(X, H, T, last_in_aa(X, T))
U5_aa(X, H, T, last_out_aa(X, T)) → last_out_aa(X, .(H, T))
U4_aaa(L, X, Last, last_out_aa(Last, LX)) → applast_out_aaa(L, X, Last)
U2_gaa(A, B, C, applast_out_aaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x1, x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
s(x1)  =  s(x1)
U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x4)
0  =  0
s2l_out_ga(x1, x2)  =  s2l_out_ga(x1)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x1, x4)
applast_in_aaa(x1, x2, x3)  =  applast_in_aaa
U3_aaa(x1, x2, x3, x4)  =  U3_aaa(x4)
append_in_aaa(x1, x2, x3)  =  append_in_aaa
append_out_aaa(x1, x2, x3)  =  append_out_aaa
U6_aaa(x1, x2, x3, x4, x5)  =  U6_aaa(x5)
U4_aaa(x1, x2, x3, x4)  =  U4_aaa(x4)
last_in_aa(x1, x2)  =  last_in_aa
last_out_aa(x1, x2)  =  last_out_aa
U5_aa(x1, x2, x3, x4)  =  U5_aa(x4)
applast_out_aaa(x1, x2, x3)  =  applast_out_aaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa(x1)
APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND_IN_AAA(L1, L2, L3)

R is empty.
The argument filtering Pi contains the following mapping:
APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APPEND_IN_AAAAPPEND_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

APPEND_IN_AAAAPPEND_IN_AAA

The TRS R consists of the following rules:none


s = APPEND_IN_AAA evaluates to t =APPEND_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APPEND_IN_AAA to APPEND_IN_AAA.





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

S2L_IN_GA(s(X), .(Y, Xs)) → S2L_IN_GA(X, Xs)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(s(X), .(Y, Xs)) → U7_ga(X, Y, Xs, s2l_in_ga(X, Xs))
s2l_in_ga(0, []) → s2l_out_ga(0, [])
U7_ga(X, Y, Xs, s2l_out_ga(X, Xs)) → s2l_out_ga(s(X), .(Y, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_aaa(D, B, C))
applast_in_aaa(L, X, Last) → U3_aaa(L, X, Last, append_in_aaa(L, .(X, []), LX))
append_in_aaa([], L, L) → append_out_aaa([], L, L)
append_in_aaa(.(H, L1), L2, .(H, L3)) → U6_aaa(H, L1, L2, L3, append_in_aaa(L1, L2, L3))
U6_aaa(H, L1, L2, L3, append_out_aaa(L1, L2, L3)) → append_out_aaa(.(H, L1), L2, .(H, L3))
U3_aaa(L, X, Last, append_out_aaa(L, .(X, []), LX)) → U4_aaa(L, X, Last, last_in_aa(Last, LX))
last_in_aa(X, .(X, [])) → last_out_aa(X, .(X, []))
last_in_aa(X, .(H, T)) → U5_aa(X, H, T, last_in_aa(X, T))
U5_aa(X, H, T, last_out_aa(X, T)) → last_out_aa(X, .(H, T))
U4_aaa(L, X, Last, last_out_aa(Last, LX)) → applast_out_aaa(L, X, Last)
U2_gaa(A, B, C, applast_out_aaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x1, x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
s(x1)  =  s(x1)
U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x4)
0  =  0
s2l_out_ga(x1, x2)  =  s2l_out_ga(x1)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x1, x4)
applast_in_aaa(x1, x2, x3)  =  applast_in_aaa
U3_aaa(x1, x2, x3, x4)  =  U3_aaa(x4)
append_in_aaa(x1, x2, x3)  =  append_in_aaa
append_out_aaa(x1, x2, x3)  =  append_out_aaa
U6_aaa(x1, x2, x3, x4, x5)  =  U6_aaa(x5)
U4_aaa(x1, x2, x3, x4)  =  U4_aaa(x4)
last_in_aa(x1, x2)  =  last_in_aa
last_out_aa(x1, x2)  =  last_out_aa
U5_aa(x1, x2, x3, x4)  =  U5_aa(x4)
applast_out_aaa(x1, x2, x3)  =  applast_out_aaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa(x1)
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

S2L_IN_GA(s(X), .(Y, Xs)) → S2L_IN_GA(X, Xs)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof

Q DP problem:
The TRS P consists of the following rules:

S2L_IN_GA(s(X)) → S2L_IN_GA(X)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs: